<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page contentType="text/html; charset=utf-8"%>
<html>
<head>
<title>今日大球赛事</title>
</head>

<script type="text/javascript"
	src="http://code.jquery.com/jquery-1.7.2.js"></script>
<script type="text/javascript">
	// function myrefresh(){
	//window.location.reload();
	//}
	//setTimeout('myrefresh()',300000); 

	function refreshGames() {
		var url = 'http://192.168.1.101:8080/KillerServer/killerWeb.sp?method=refreshGames';
		$.post(url, function(data) {
			var ret = data;
			$("#todayGames").empty();
			$("#todayGames").html(ret);
		}, 'html');
	}
	
	function todayGames() {
		var url = 'http://192.168.1.101:8080/KillerServer/killerWeb.sp?method=todayDaqiuGames';
		$.post(url, function(data) {
			var ret = data;
			$("#todayGames").empty();
			$("#todayGames").html(ret);
		}, 'html');
	}

	function analysisAll() {
		var url = 'http://192.168.1.101:8080/KillerServer/killerWeb.sp?method=analysisAllDaqiu';
		var shuiweiOffset = $("#shuiweiOffset").val();
		var daxiaoOffset = $("#daxiaoOffset").val();
		var hasDaxiao = $("#hasDaxiao").val();
		$.post(url, {
			shuiweiOffset : shuiweiOffset,
			daxiaoOffset : daxiaoOffset,
			hasDaxiao : hasDaxiao
		}, function(data) {
			var ret = data;
			$("#todayGames").empty();
			$("#todayGames").html(ret);
		}, 'html');
	}

	function analysis(gameId) {
		var url = 'http://192.168.1.101:8080/KillerServer/killerWeb.sp?method=analysis';
		var shuiweiOffset = $("#shuiweiOffset").val();
		var daxiaoOffset = $("#daxiaoOffset").val();
		var hasDaxiao = $("#hasDaxiao").val();
		$.post(url, {
			gameId : gameId,
			shuiweiOffset : shuiweiOffset,
			daxiaoOffset : daxiaoOffset,
			hasDaxiao : hasDaxiao
		}, function(data) {
			var ret = data;
			$("#killerResult" + gameId).empty();
			$("#killerResult" + gameId).html(ret);
		}, 'html');
	}
</script>

<body onload="todayGames()">
	<div>
		<input type="submit" value="今日赛事" onclick="todayGames()">
		水位偏离值:<input id="shuiweiOffset" type="text" value="0.1">加大小<input id="hasDaxiao" type="text" value="0">大小偏离值：<input
			id="daxiaoOffset" type="text" value="1"> <input
			type="submit" value="分析所有" onclick="analysisAll()">
	</div>
	<div>
		<table id="todayGames" style="border: solid 2px;">
		</table>
	</div>
</body>
</html>
